<%-- 
    Document   : productinfoForm
    Created on : Apr 6, 2011, 8:37:55 PM
    Author     : Nguyen Hung
--%>

<%@page import="Business.Product"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../WEB-INF/jspf/headeradmin.jspf" %>
<%
            Product product = (Product) request.getAttribute("product");
            String productCodeText = "", cpuText="", ramText="", hddText="", cardMonitorText = "", displayText = "";
            String wirelessText ="",batteryText="", wightheightText="", descriptionText="";
            String priceText="", osText="", dvdText="" , quantityText ="";

            if (product != null) {
                productCodeText = product.getProductCode();
                cpuText = product.getCpu();
                ramText = product.getRam();
                hddText = product.getHdd();
                cardMonitorText = product.getCardmonitor();
                displayText = product.getDisplay();
                wirelessText = product.getLanwirelessbluetooth();
                wightheightText = product.getWeightheight();
                descriptionText = product.getDescription();
                priceText = product.getPrice() + "";
                osText = product.getOS();
                dvdText = product.getOS();
                batteryText= product.getBattery();
                quantityText= product.getQuantity() + "";


            }


%>
<table width="758" border="1">
    <caption>
        Thông Tin Sản Phẩm
    </caption>
    <tr>
        <td width="25%">Mã Sản Phẩm (*)</td>
        <td width="25%"><label>
                <input type="text" name="productCode" id="productCode" value="<%=productCodeText%>"/>
            </label></td>
        <td width="25%">Khối Lượng</td>
        <td width="25%"><label>
                <input type="text" name="weighheight" id="weighheight" value="<%=wightheightText%>" />
            </label></td>
    </tr>
    <tr>
        <td>CPU</td>
        <td><label>
                <input type="text" name="cpu" id="cpu" value="<%=cpuText%>"/>
            </label></td>
        <td>Nhà Sản Xuất</td>
        <td><label>
                <select name="vendor" id="vendor">
                    <option value="0">Nhà sản xuất</option>
                    <option value="1">HP-Compacq</option>
                    <option value="2">Dell</option>
                    <option value="3">Sony</option>
                    <option value="4">Lenovo</option>
                    <option value="5">Toshiba</option>
                    <option value="6">Acer</option>
                    <option value="7">Asus</option>
                    <option value="8">Macbook</option>
                    <option value="9">Fujitsu</option>
                    <option value="10">Gigabyte</option>
                    <option value="11">MSI</option>
                    <option value="12">Samsung</option>
                </select>
            </label></td>
    </tr>
    <tr>
        <td>Ram</td>
        <td><label>
                <input type="text" name="ram" id="ram"<%=ramText%> />
            </label></td>
        <td>Hệ Điều hành</td>
        <td><label>
                <input type="text" name="os" id="os"value="<%=osText%>" />
            </label></td>
    </tr>
    <tr>
        <td>HDD</td>
        <td><label>
                <input type="text" name="hdd" id="hdd" value="<%=hddText%>"/>
            </label></td>
        <td>Giá</td>
        <td><label>
                <input type="text" name="price" id="price" value="<%=priceText%>"/>
                VNĐ</label></td>
    </tr>
    <tr>
        <td>Card Màn Hình</td>
        <td><label>
                <input type="text" name="cardmonitor" id="cardmonitor" value="<%=cardMonitorText%>"/>
            </label></td>
        <td>DVD - WL</td>
        <td><label>
                <input type="text" name="dvd" id="dvd" value="<%=dvdText%>"/>
            </label></td>
    </tr>
    <tr>
        <td>Màn Hình</td>
        <td><label>
                <input type="text" name="display" id="display" value="<%=displayText%>"/>
            </label></td>
        <td>Số Lượng</td>
        <td><label>
                <input type="text" name="quantity" id="quantity" value="<%=quantityText%>"/>
            </label></td>
    </tr>
    <tr>
        <td>Card Mạng, Wireless</td>
        <td><label>
                <input type="text" name="wireless" id="wireless" value="<%=wirelessText%>"/>
            </label></td>
        <td rowspan="3">Mô tả sản phẩm</td>
        <td rowspan="3"><textarea name="description" id="description" cols="45" rows="5" value="<%=descriptionText%>"></textarea></td>
    </tr>
    <tr>
        <td>Bảo Hành</td>
        <td><label>
                <select name="warranty" id="warranty">
                    <option value="6">6</option>
                    <option value="12">12</option>
                    <option value="24">24</option>
                    <option value="36">36</option>
                    <option value="48">48</option>
                </select>
                Tháng
            </label></td>
    </tr>
    <tr>
        <td>Battery</td>
        <td><label>
                <input type="text" name="battery" id="battery" value="<%=batteryText%>"/>
            </label></td>
    </tr>
    <tr>
        <td colspan="2"><label>
                <input type="submit" name="submit" id="submit" value="Save" />
            </label></td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
    </tr>
</table>
<%@include file="../WEB-INF/jspf/footeradmin.jspf" %>